using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class _Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (IsPostBack)
        {
        }
        else
        {
            btnLogin.Attributes.Add("OnClick", "javascript:return saveCookie();");
        }
    }
    protected void btnLogin_Click(object sender, EventArgs e)
    {
        if (TUser.CheckLogin(email.Text, password.Text))
        {
            this.Response.Redirect("./user/user_login_ok.aspx");
        }
        else
        {
            this.Response.Redirect("./user/user_login_error.aspx");
        }
    }
}